package com.ygqh.baby.model;

import java.util.Date;

import com.ygqh.baby.utils.DateConvertUtils;

/**
 *
 */
public class MonitorError {
	private String method;

	private String content;

	private Date lastRunTime;

	public MonitorError() {
		super();
	}

	public MonitorError(String method, String content, Date lastRunTime) {
		super();
		this.method = method;
		this.content = content;
		this.lastRunTime = lastRunTime;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getLastRunTime() {
		return lastRunTime;
	}

	public void setLastRunTime(Date lastRunTime) {
		this.lastRunTime = lastRunTime;
	}

	public String getMessage() {
		StringBuffer buff = new StringBuffer();
		buff.append(method).append(":" + content).append(";</br>最后一次执行时间：" + DateConvertUtils.formatDateTime(lastRunTime));
		return buff.toString();
	}

	@Override
	public String toString() {
		return "MonitorErrorModel [method=" + method + ", content=" + content + ", lastRunTime=" + lastRunTime + "]";
	}

}
